<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>公众号最佳发文时间整理</title>
    <script src="../js/html2canvas.min.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            color: #333;
            line-height: 1.8;
            padding-right: 80px;
        }
        .article-container {
            max-width: 500px;
            margin: 0 auto;
            padding: 20px;
        }
        .article-title {
            font-size: 24px;
            font-weight: bold;
            color: #222;
            margin-bottom: 20px;
            text-align: center;
            border-bottom: 2px solid #e8f4f8;
            padding-bottom: 15px;
        }
        .article-content {
            font-size: 16px;
            transition: font-size 0.3s ease;
        }
        .article-content p {
            margin-bottom: 20px;
            text-align: justify;
            text-indent: 2em;
        }
        .section-title {
            font-size: 20px;
            font-weight: bold;
            color: #222;
            margin: 40px 0 20px 0;
            padding: 10px 15px;
            background-color: #e8f4f8;
            border-radius: 8px;
            display: flex;
            align-items: center;
        }
        .section-title .number {
            background-color: #4299e1;
            color: white;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            margin-right: 12px;
        }
        .time-section {
            background-color: #f0f8fb;
            border-radius: 8px;
            padding: 20px;
            margin: 20px 0;
        }
        .time-section h3 {
            color: #2d3748;
            font-size: 18px;
            margin-bottom: 15px;
        }
        .time-slots {
            display: grid;
            gap: 15px;
        }
        .time-slot {
            background-color: #ffffff;
            padding: 15px;
            border-radius: 6px;
            border-left: 3px solid #4299e1;
        }
        .time-slot .time {
            font-size: 16px;
            font-weight: bold;
            color: #4299e1;
            margin-bottom: 5px;
        }
        .time-slot .audience {
            font-size: 18px;
            color: #718096;
            margin-bottom: 8px;
        }
        .time-slot .content {
            font-size: 18px;
            color: #4a5568;
        }
        .tips-section {
            margin: 20px 0;
        }
        .tip-card {
            background-color: #f5fafe;
            border-radius: 8px;
            padding: 20px;
            border: 1px solid #dee2e6;
        }
        .tip-card .title {
            font-size: 16px;
            font-weight: bold;
            color: #2d3748;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
        }
        .tip-card .title::before {
            content: '💡';
            margin-right: 8px;
            font-size: 18px;
        }
        .tip-card .description {
            font-size: 18px;
            color: #4a5568;
            line-height: 1.6;
        }
        .divider {
            height: 1px;
            background: linear-gradient(90deg, transparent, #4299e1, transparent);
            margin: 30px 0;
            opacity: 0.5;
        }
        .float-buttons {
            position: fixed;
            top: 50%;
            right: 20px;
            transform: translateY(-50%);
            display: flex;
            flex-direction: column;
            gap: 12px;
            z-index: 1000;
        }
        .float-btn {
            width: 50px;
            height: 50px;
            background-color: #4299e1;
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            cursor: pointer;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
            transition: all 0.2s ease;
        }
        .float-btn:hover {
            background-color: #38b2ac;
            transform: scale(1.1);
        }
        .float-btn:active {
            transform: scale(0.95);
        }
        .export-btn {
            background-color: #9f7aea;
        }
        .export-btn:hover {
            background-color: #48bb78;
        }
        /* 可编辑元素的样式 */
        [contenteditable="true"] {
            outline: 2px solid transparent;
            transition: outline 0.2s ease;
            border-radius: 4px;
        }
        [contenteditable="true"]:hover {
            background-color: #fafafa;
        }
        [contenteditable="true"]:focus {
            outline: 2px solid #4299e1;
            background-color: #f8f8f8;
        }
    </style>
</head>
<body>
    <div class="article-container" contenteditable="true">
        <h1 class="article-title">最全公众号最佳发文时间整理</h1>
        <div class="article-content" id="articleContent">
            <p>
                <strong>引言：</strong>
                想让你的公众号文章被更多人看到？选对发文时间，效果可能事半功倍。很多运营者都在问：到底几点发文最合适？今天，我们就来详细聊聊这个话题，帮你找到最适合自己的黄金发布时间。
            </p>

            <div class="divider"></div>

            <div class="section-title">
                <span class="number">1</span>
                <span>常规黄金时段</span>
            </div>
            <p>这是大多数公众号都适用的通用时间，覆盖了用户一天中最主要的碎片时间。</p>
            <div class="time-section">
                <div class="time-slots">
                    <div class="time-slot">
                        <div class="time">早间档：7:00 - 9:00</div>
                        <div class="audience">核心受众：通勤族、早起人群</div>
                        <div class="content">内容建议：新闻资讯、早间鸡汤、简短干货</div>
                    </div>
                    <div class="time-slot">
                        <div class="time">午间档：12:00 - 13:30</div>
                        <div class="audience">核心受众：上班族、学生</div>
                        <div class="content">内容建议：轻松短文、互动话题、生活技巧</div>
                    </div>
                    <div class="time-slot">
                        <div class="time">晚间档：19:00 - 22:00</div>
                        <div class="audience">核心受众：所有人群，流量最高峰</div>
                        <div class="content">内容建议：深度长文、情感故事、观点类、视频</div>
                    </div>
                </div>
            </div>

            <div class="divider"></div>

            <div class="section-title">
                <span class="number">2</span>
                <span>按行业/内容类型选择</span>
            </div>
            <p>不同类型的公众号，目标用户的活跃时间也不同，精准定位才能效果最大化。</p>
            <div class="time-section">
                 <h3>行业特殊时间</h3>
                <div class="time-slots">
                    <div class="time-slot">
                        <div class="time">职场/干货类</div>
                        <div class="audience">最佳时间：周二至周四 8:00-9:00</div>
                        <div class="content">原因：工作日开始，用户有学习和自我提升的需求</div>
                    </div>
                    <div class="time-slot">
                        <div class="time">母婴/教育类</div>
                        <div class="audience">最佳时间：周末 19:00-21:00</div>
                        <div class="content">原因：家长在周末有更多时间陪伴孩子，关注相关内容</div>
                    </div>
                    <div class="time-slot">
                        <div class="time">电商/消费类</div>
                        <div class="audience">最佳时间：周五 17:00-19:00</div>
                        <div class="content">原因：临近周末，用户开始计划购物和娱乐活动</div>
                    </div>
                     <div class="time-slot">
                        <div class="time">情感/故事类</div>
                        <div class="audience">最佳时间：深夜 21:00-23:00</div>
                        <div class="content">原因：夜深人静，用户更容易产生情感共鸣</div>
                    </div>
                </div>
            </div>

            <div class="divider"></div>

            <div class="section-title">
                <span class="number">3</span>
                <span>特殊场景与注意事项</span>
            </div>
            <div class="tips-section">
                <div class="tip-card">
                    <div class="title">节假日提前布局</div>
                    <div class="description">提前1-2天发布相关主题内容，抢占流量先机，流量可能增长40%以上。</div>
                </div>
                <div class="tip-card">
                    <div class="title">热点事件快速反应</div>
                    <div class="description">事件发生后2小时内是追热点的黄金窗口，及时发布才能获得最大曝光。</div>
                </div>
                <div class="tip-card">
                    <div class="title">数据驱动测试</div>
                    <div class="description">在不同时间点发布同类内容，通过数据分析找到最适合自己账号的“私域黄金时间”。</div>
                </div>
                <div class="tip-card">
                    <div class="title">保持稳定更新</div>
                    <div class="description">一旦找到合适的时间，尽量保持规律的更新频率，培养用户的阅读习惯和期待感。</div>
                </div>
            </div>
        </div>
    </div>

    <div class="float-buttons">
        <div class="float-btn" id="increaseFontBtn" title="放大字体">+</div>
        <div class="float-btn" id="decreaseFontBtn" title="缩小字体">-</div>
        <div class="float-btn export-btn" id="exportImageBtn" title="导出长图">📷</div>
    </div>

    <script>
        const articleContent = document.getElementById('articleContent');
        const increaseFontBtn = document.getElementById('increaseFontBtn');
        const decreaseFontBtn = document.getElementById('decreaseFontBtn');
        const exportImageBtn = document.getElementById('exportImageBtn');

        let currentFontSize = 16;
        const minFontSize = 12;
        const maxFontSize = 24;
        const step = 2;

        increaseFontBtn.addEventListener('click', function() {
            if (currentFontSize < maxFontSize) {
                currentFontSize += step;
                articleContent.style.fontSize = currentFontSize + 'px';
            }
        });

        decreaseFontBtn.addEventListener('click', function() {
            if (currentFontSize > minFontSize) {
                currentFontSize -= step;
                articleContent.style.fontSize = currentFontSize + 'px';
            }
        });

        exportImageBtn.addEventListener('click', function() {
            exportImageBtn.innerHTML = '⏳';
            exportImageBtn.title = '正在生成图片...';
            
            html2canvas(document.querySelector('.article-container'), {
                scale: 2,
                useCORS: true,
                logging: false
            }).then(canvas => {
                const link = document.createElement('a');
                link.download = '公众号最佳发文时间整理.png';
                link.href = canvas.toDataURL('image/png');
                link.click();
                
                exportImageBtn.innerHTML = '📷';
                exportImageBtn.title = '导出长图';
            });
        });
    </script>
</body>
</html>
